package com.ohuang.wallpapermanager.db

import com.ohuang.wallpapermanager.storage.storage.SpStorageUtil
import com.ohuang.wallpapermanager.storage.storage.getValue
import com.ohuang.wallpapermanager.storage.storage.setValue
import com.ohuang.wallpapermanager.util.AppUtil

class WallPaperConfigInfo(type: String)  {

    private var storageUtil =
        SpStorageUtil(AppUtil.getInstance().application, "WallPaperConfigInfo$type")

    var isCarouselEnable:Boolean by  storageUtil.get("isCarouselEnable", true)

    var minRandomInterval:Long by  storageUtil.get("minRandomInterval", 15*60_000L)  //随机壁纸最小间隔时间

    var lastUpdateTimeRandom:Long by  storageUtil.get("lastUpdateTimeRandom", 0L)  //上一次更新随机 锁屏壁纸的时间
    var lastUpdateTime:Long by  storageUtil.get("lastUpdateTime", 0L)  //上一次更新锁屏壁纸的时间
    var lastUpdateWallId:Long by  storageUtil.get("lastUpdateWallId", 0L)  //上一次更新锁屏壁纸的id
}